home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / libg_261.zip / libg_261 / libg++ / gperf / tests / Makefile.in < prev    next >
Makefile  |  1993-12-17  |  3KB  |  73 lines

  1. # Copyright (C) 1989, 1992, 1993 Free Software Foundation, Inc.
  2. # written by Douglas C. Schmidt (schmidt@ics.uci.edu)
  3. # This file is part of GNU GPERF.
  4. # GNU GPERF is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 1, or (at your option)
  7. # any later version.
  8. # GNU GPERF is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  11. # GNU General Public License for more details.
  12. # You should have received a copy of the GNU General Public License
  13. # along with GNU GPERF; see the file COPYING.  If not, write to
  14. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 
  15.  
  16. srcdir = .
  17.  
  18. #### package, host, target, and site dependent Makefile fragments come in here.
  19. ##
  20.  
  21. GPERF = ../src/gperf
  22.  
  23. check:
  24.     @echo "performing some tests of the perfect hash generator"   
  25.     $(CC) -c $(CFLAGS) $(srcdir)/test.c
  26.     $(GPERF) -p -c -l -S1 -o $(srcdir)/c.gperf > cinset.c
  27.     $(CC) $(CFLAGS) -o cout cinset.c test.o
  28.     @echo "testing ANSI C reserved words, all items should be found in the set"
  29.     ./cout -v < $(srcdir)/c.gperf > c.out
  30.     -diff -b $(srcdir)/c.exp c.out
  31.     $(GPERF) -k1,4,'$$' $(srcdir)/ada.gperf > adainset.c
  32. # double '$$' is only there since make gets confused; programn wants only 1 '$'
  33.     $(CC) $(CFLAGS) -o aout adainset.c test.o
  34.     @echo "testing Ada reserved words, all items should be found in the set"
  35.     ./aout -v < $(srcdir)/ada.gperf > ada-res.out
  36.     -diff -b $(srcdir)/ada-res.exp ada-res.out
  37.     $(GPERF) -p -D -k1,'$$' -s 2 -o $(srcdir)/adadefs.gperf > preinset.c
  38.     $(CC) $(CFLAGS) -o preout preinset.c test.o
  39.     @echo "testing Ada predefined words, all items should be found in the set"
  40.     ./preout -v < $(srcdir)/adadefs.gperf > ada-pred.out
  41.     -diff -b $(srcdir)/ada-pred.exp ada-pred.out
  42.     $(GPERF) -k1,2,'$$' -o $(srcdir)/modula3.gperf > m3inset.c
  43.     $(CC) $(CFLAGS) -o m3out m3inset.c test.o
  44.     @echo "testing Modula3 reserved words, all items should be found in the set"
  45.     ./m3out -v < $(srcdir)/modula3.gperf > modula.out
  46.     -diff -b $(srcdir)/modula.exp modula.out
  47.     $(GPERF) -o -S2 -p < $(srcdir)/pascal.gperf > pinset.c
  48.     $(CC) $(CFLAGS) -o pout pinset.c test.o
  49.     @echo "testing Pascal reserved words, all items should be found in the set"
  50.     ./pout -v < $(srcdir)/pascal.gperf > pascal.out
  51.     -diff -b $(srcdir)/pascal.exp pascal.out
  52. # these next 5 are demos that show off the generated code
  53.     $(GPERF) -p -j1 -g -o -t -N is_reserved_word -k1,3,'$$' < $(srcdir)/c-parse.gperf > test-1.out
  54.     -diff -b $(srcdir)/test-1.exp test-1.out
  55.     $(GPERF) -n -k1-8 -l <$(srcdir)/modula2.gperf > test-2.out
  56.     -diff -b $(srcdir)/test-2.exp test-2.out
  57.     $(GPERF) -p -j 1 -o -a -C -g -t -k1,4,$$ < $(srcdir)/gplus.gperf > test-3.out
  58.     -diff -b $(srcdir)/test-3.exp test-3.out
  59.     $(GPERF) -D -p -t < $(srcdir)/c-parse.gperf > test-4.out
  60.     -diff -b $(srcdir)/test-4.exp test-4.out
  61.     $(GPERF) -g -o -j1 -t -p -N is_reserved_word < $(srcdir)/gpc.gperf > test-5.out
  62.     -diff -b $(srcdir)/test-5.exp test-5.out
  63. # prints out the help message
  64.     -$(GPERF) -h > test-6.out 2>&1 || [ a = a ]
  65.     -diff -b $(srcdir)/test-6.exp test-6.out
  66.     @echo "only if, do, for, case, goto, else, while, and return should be found "
  67.     ./aout -v < $(srcdir)/c.gperf > test-7.out
  68.     -diff -b $(srcdir)/test-7.exp test-7.out
  69.